home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / driverss.zip / PRINTNUM.ASM < prev    next >
Assembly Source File  |  1990-11-24  |  650b  |  31 lines

  1. ;put into the public domain by Russell Nelson, nelson@clutx.clarkson.edu
  2.  
  3.     public    print_number
  4. print_number:
  5. ;enter with dx -> dollar terminated name of number, di ->dword.
  6. ;exit with the number printed and the cursor advanced to the next line.
  7.     mov    ah,9            ;print the name of the number.
  8.     int    21h
  9.     mov    al,'0'
  10.     call    chrout
  11.     mov    al,'x'
  12.     call    chrout
  13.     mov    ax,[di]            ;print the number in hex.
  14.     mov    dx,[di+2]
  15.     call    dwordout
  16.     mov    al,' '
  17.     call    chrout
  18.     mov    al,'('
  19.     call    chrout
  20.     mov    ax,[di]            ;print the number in decimal.
  21.     mov    dx,[di+2]
  22.     call    decout
  23.     mov    al,')'
  24.     call    chrout
  25.     mov    al,CR
  26.     call    chrout
  27.     mov    al,LF
  28.     call    chrout
  29.     ret
  30.  
  31.